<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1, user-scalable=0, minimal-ui" charset="UTF-8">
        <title></title>
        <link rel="stylesheet" href="css/index.css" />
        <link rel="stylesheet" href="css/swiper.css" />
        <link rel="stylesheet" href="css/mint.css">
    </head>
    <script src="js/serverUrl.js"></script>
    <script src="js/vue.js"></script>
    <script src="js/mint.js"></script>
    <script src="js/moment.js"></script>
	<style type="text/css">
		.examContainer{
			display: flex;
		}
		
		.examItem{
			width: 45vw;
			height: 18vw;
			display: flex;
			justify-content: space-between;
			align-items: center;
			background-color: #f8f8f8;
			margin-top: 15px;
			margin-left: 3vw;
			border-radius: 5px;
		}
		.examImage{
			height: 10vw;
			width: 10vw;
			margin-left: 5vw;
		}
		.examInfo{
			flex:1;
			display: flex;
			flex-direction: column;
			margin-left: 4vw;
		}
		.examName{
			font-size: 4.5vw;
			font-weight: bold;
			color: black;
		}
		
		.examBrief{
			font-size: 3vw;
			color: gray;
		}
		
		.examOnline{
			width: 93vw;
			height: 18vw;
			display: flex;
			justify-content: space-between;
			align-items: center;
			background-color: #f8f8f8;
			margin-top: 15px;
			margin-left: 3vw;
			border-radius: 5px;
		}
	</style>
	<body style="background-color: white;">
        <div id="app">
<!--            <mt-swipe  style="height: 40vw;" :auto="4000">-->
<!--              <mt-swipe-item v-for="item in imageList"> <img  class="swiper-slide" :src="item"></mt-swipe-item>-->
<!--            </mt-swipe>-->
            
            <div class="examContainer">
                <div class="examItem" @click.stop="toExam(1)">
                    <img class="examImage" src="img/day_exam.png"/>
                    <div class="examInfo">
                        <div class="examName">每日一练</div>
                        <div class="examBrief">每日三题一练</div>
                    </div>
                </div>
                <div class="examItem" @click.stop="toExam(2)">
                    <img class="examImage" src="img/week_exam.png"/>
                    <div class="examInfo">
                        <div class="examName">每周答题</div>
                        <div class="examBrief">每周十题答题</div>
                    </div>
                </div>
            </div>
            <div class="examContainer">
                <div class="examItem" @click.stop="toExam(3)">
                    <img class="examImage" src="img/month_exam.png"/>
                    <div class="examInfo">
                        <div class="examName">每月测试</div>
                        <div class="examBrief">每月三十题自测</div>
                    </div>
                </div>
                <div class="examItem" @click.stop="toQuestionBank()">
                    <img class="examImage" src="img/question_bank.png"/>
                    <div class="examInfo">
                        <div class="examName">试题学习</div>
                        <div class="examBrief">百万题库学习</div>
                    </div>
                </div>
            </div>
            
            <div class="examContainer">
                <div class="examItem" @click.stop="toOnlineExam()">
                    <img class="examImage" src="img/online_exam.png"/>
                    <div class="examInfo">
                        <div class="examName">在线考试</div>
                        <div class="examBrief">在线考试</div>
                    </div>
                </div>
                <div class="examItem" @click.stop="toEOnlineExam()">
                    <img class="examImage" src="img/e_online_exam.png"/>
                    <div class="examInfo">
                        <div class="examName">专项答题</div>
                        <div class="examBrief">专项答题</div>
                    </div>
                </div>
            </div>
            <!--<div class="examContainer" v-if="userId == '20988'">
                <div class="examItem" @click.stop="toOnlineTrain()">
                    <img class="examImage" src="img/skfg.png"/>
                    <div class="examInfo">
                        <div class="examName">在线培训</div>
                        <div class="examBrief">在线培训</div>
                    </div>
                </div>
                <div class="examItem" @click.stop="toEOnlineVideo()">
                    <img class="examImage" src="img/video2.png"/>
                    <div class="examInfo">
                        <div class="examName">在线直播</div>
                        <div class="examBrief">在线直播</div>
                    </div>
                </div>
            </div>-->
        </div>
    </body>
    
    <script type="text/javascript">
        var app = new Vue({
          el: '#app',
          data: {
           imageList: [],
           userId: 0
          },
          created () {
              window.getImageList = this.getImageList
              window.getUserId = this.getUserId
          },
          methods:{
              getImageList (imageList) {
                  this.imageList = imageList
              },
              getUserId (userId) {
                  this.userId = userId
              },
              toExam(type) {
                  let params = {
                      type: type
                  }
                  WebViewJavascriptBridge.callHandler('toExam',params);
              },
              toQuestionBank () {
                  WebViewJavascriptBridge.callHandler('toQuestionBank',{},function(response) {
                     
                  });
              },
              toOnlineExam() {
                  WebViewJavascriptBridge.callHandler('toOnlineExam',{});
              },
              toEOnlineExam() {
                  WebViewJavascriptBridge.callHandler('toEOnlineExam',{});
              },
              toOnlineTrain(){
                  WebViewJavascriptBridge.callHandler('toEOnlineTrain',{});
              },
              toEOnlineVideo(){
                  WebViewJavascriptBridge.callHandler('toEOnlineVideo',{});
              }
          }
        })
    </script>
</html>
